﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Common;

namespace BusinessLayer2
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IUserServices" in both code and config file together.
    [ServiceContract]
    public interface IUserServices
    {
        [OperationContract]
        void AddUser(User u);

        [OperationContract]
        void UpdateUser(User u);

        [OperationContract]
        IEnumerable<User> GetAllUsers();

        [OperationContract]
        User GetUserByUserName(string UserName);

        [OperationContract]
        bool UserLogin(string UserName, string Password);

        [OperationContract]
        bool CheckUsernameExists(string username);
        
        [OperationContract]
        bool CheckEmailExists(string email);

        [OperationContract]
        IEnumerable<Common.Menu> GetMenus(int roleId);

        [OperationContract]
        IEnumerable<Country> GetAllCountries();

        [OperationContract]
        IEnumerable<Role> GetAllUserRoles(string username);
    }
}
